package me.xiaoyan.ehr.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import me.xiaoyan.ehr.mapper.CheckRecordMapper;
import me.xiaoyan.ehr.po.CheckRecord;
import me.xiaoyan.ehr.service.CheckRecordService;
import me.xiaoyan.ehr.util.StringUtil;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CheckRecordServiceImpl extends BaseService<CheckRecordMapper, CheckRecord> implements CheckRecordService {
    @Override
    public List<CheckRecord> getTodayRecord() {
        QueryWrapper query = new QueryWrapper();
        query.eq("record_date", StringUtil.formatDate("dd"));
        query.eq("record_month", StringUtil.formatDate("yyyyMM"));
        return list(query);
    }
}
